<?php
/**
 * 作用获得类，避免一个类new出很多个，减少内存开销
 */
 class  ClassManager {
 	
 	 public  static function getVerificationCode(){
 		if (!Zend_Registry::isRegistered('verificationCode')){
 			Zend_Registry::set('verificationCode', new VerificationCode());
 		}
 		return  Zend_Registry::get('verificationCode');
	}
	
	public static function getSql(){
 		if (!Zend_Registry::isRegistered('sql')){
 			Zend_Registry::set('sql', new Sql());
 		}
 		return  Zend_Registry::get('sql');
	}
	
	public static  function getFile(){
		if (!Zend_Registry::isRegistered('file')){
			Zend_Registry::set('file', new File());
		}
		return  Zend_Registry::get('file');		
	}
	
	public static  function getCache(){
		if (!Zend_Registry::isRegistered('cache')){
			Zend_Registry::set('cache', new Cache());
		}
		return  Zend_Registry::get('cache');		
	}
	
	
	public static  function getTableConfig(){
		if (!Zend_Registry::isRegistered('tableConfig')){
			Zend_Registry::set('tableConfig', new TableConfig());
		}
		return  Zend_Registry::get('tableConfig');		
	}
	

	public static  function getToos(){
		if (!Zend_Registry::isRegistered('toos')){
			Zend_Registry::set('toos', new Toos());
		}
		return  Zend_Registry::get('toos');
	}


	public static  function getUeditor(){
		if (!Zend_Registry::isRegistered('ueditor')){
			Zend_Registry::set('ueditor', new Ueditor());
		}
		return  Zend_Registry::get('ueditor');
	}
		

	public static  function getEmail(){
		if (!Zend_Registry::isRegistered('email')){
			Zend_Registry::set('email', new Email());
		}
		return  Zend_Registry::get('email');
	}
		

	public static  function getCommon(){
		if (!Zend_Registry::isRegistered('common')){
			Zend_Registry::set('common', new Common());
		}
		return  Zend_Registry::get('common');
	}
		

	public static  function getCalendar(){
		if (!Zend_Registry::isRegistered('calendar')){
			Zend_Registry::set('calendar', new Calendar());
		}
		return  Zend_Registry::get('calendar');
	}
}

?>